//
//  JoinUsModels.swift
//  甜言蜜语
//
//  Created by 王剑伟 on 16/7/18.
//  Copyright © 2016年 wl. All rights reserved.
//

import Foundation
import SwiftyJSON

class JoinUsModel: NewsModelInitProtocol {
    var id: Int
    var sex: String
    var age: String
    var name: String
    var unitarea: String
    var lift: String
    var imgsrc: String
    var pay: String
    var positiontype: String
    var unittype: String
    var type: String
    var title: String
    var unittag: String
    var unitaddress: String

    required init(json: JSON) {
        id = json["id"].intValue
        sex = json["sex"].stringValue
        age = json["age"].stringValue
        name = json["name"].stringValue
        unitarea = json["unitarea"].stringValue
        lift = json["lift"].stringValue
        imgsrc = json["imgsrc"].stringValue
        pay = json["pay"].stringValue
        positiontype = json["positiontype"].stringValue
        unittype = json["unittype"].stringValue
        type = json["type"].stringValue
        title = json["title"].stringValue
        unittag = json["unittag"].stringValue
        unitaddress = json["unitaddress"].stringValue
    }
}

class JobWantedModel: NewsModelInitProtocol {
    
    var id: Int
    var imgsrc: String
    
    required init(json: JSON) {
        id = json["id"].intValue
        imgsrc = json["imgsrc"].stringValue
    }
    
    
}
class JoinUsDetailModel: NewsModelInitProtocol {
    var id: Int?
    var unitType: String?
    var positionType: String?
    var unitArea: String?
    var pay: String?
    var lift: String?
    var requirement: String?
    var contacts: String?
    var tel: String?
    var education: String?
    var ptime: String?
    var browerNum: String?
    var imgSrc: String?
    var name: String?
    var sex: String?
    var birthday: String?
    var lastUnitName: String?
    var lastPostion: String?
    var lastBTime: String?
    var lastETime: String?
    var lightSpot: String?
    var imageDisplay: String?
    var type: String?
    var rmList: [JoinUsModel]?
    var jobimagedisplaies: [JobWantedModel]?
    var age: String?
    var lastpay: String?
    var title: String?
    var unitname: String?
    var unitaddress: String?
    var isshoucang: Bool
    var unitarea: String
    var username: String
    var usertimg: String
    var unittype: String
    var userid: String
    required init(json: JSON) {
        id = json["id"].intValue
        unitType = json["unittype"].stringValue
        positionType = json["positiontype"].stringValue
        unitArea = json["unitarea"].stringValue
        pay = json["pay"].stringValue
        lift = json["lift"].stringValue
        requirement = json["requirement"].stringValue
        contacts = json["contacts"].stringValue
        tel = json["tel"].stringValue
        education = json["education"].stringValue
        ptime = json["ptime"].stringValue
        browerNum = json["browernum"].stringValue
        imgSrc = json["imgsrc"].stringValue
        name = json["name"].stringValue
        sex = json["sex"].stringValue
        birthday = json["birthday"].stringValue
        lastUnitName = json["lastunitname"].stringValue
        lastPostion = json["lastposition"].stringValue
        lastBTime = json["lastbtime"].stringValue
        lastETime = json["lastetime"].stringValue
        lightSpot = json["lightspot"].stringValue
        imageDisplay = json["imagedisplay"].stringValue
        type = json["type"].stringValue
        rmList = ModelArrayProvider.arrayModel(JoinUsModel.self, json: json["rmlist"])
        jobimagedisplaies = ModelArrayProvider.arrayModel(JobWantedModel.self, json: json["jobimagedisplaies"])
        age = json["age"].stringValue
        lastpay = json["lastpay"].stringValue
        title = json["title"].stringValue
        unitname = json["unitname"].stringValue
        unitaddress = json["unitaddress"].stringValue
        isshoucang = json["isshoucang"].boolValue
        unitarea = json["unitarea"].stringValue
        username = json["username"].stringValue
        usertimg = json["usertimg"].stringValue
        unittype = json["unittype"].stringValue
        userid = json["userid"].stringValue
        
    }
}